package com.zmx.product.entity;

import com.zmx.common.common.entitys.BaseEntity;
import lombok.Data;

import javax.persistence.*;

import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.Where;

import java.math.BigDecimal;

/**
 * @author zhaomxr
 * null
 */
@Data
@Entity
@Table(name = "product")
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Inheritance(strategy = InheritanceType.JOINED)
@Where(clause = "dr = 0")
public class Product extends BaseEntity {

    /**
     * 已分配库存
     */
    @Column(name = "allocated_stock")
    private Integer allocatedStock;

    /**
     * 全称
     */
    @Column(name = "full_name")
    private String fullName;

    /**
     * 商品全称
     */
    @Column(name = "name")
    private String name;

    /**
     * 点击数
     */
    @Column(name = "hits")
    private Long hits;

    /**
     * 图片
     */
    @Column(name = "image")
    private String image;

    /**
     * 是否列出
     */
    @Column(name = "is_list")
    private Integer isList;

    /**
     * 是否上架,0-下架，1-上架
     */
    @Column(name = "marketable")
    private Integer marketable;

    /**
     * 等级
     */
    @Column(name = "ranking")
    private Integer ranking;

    /**
     * 搜索关键词
     */
    @Column(name = "keyword")
    private String keyword;

    /**
     * 市场价
     */
    @Column(name = "market_price")
    private BigDecimal marketPrice;

    /**
     * 积分
     */
    @Column(name = "point")
    private Long point;

    /**
     * 销售价
     */
    @Column(name = "price")
    private BigDecimal price;

    /**
     * 销量
     */
    @Column(name = "sales")
    private Long sales;

    /**
     * 评分
     */
    @Column(name = "score")
    private Double score;

    /**
     * 页面描述
     */
    @Column(name = "seo_description")
    private String seoDescription;

    /**
     * 页面关键词
     */
    @Column(name = "seo_keywords")
    private String seoKeywords;

    /**
     * 页面标题
     */
    @Column(name = "seo_title")
    private String seoTitle;

    /**
     * 编号
     */
    @Column(name = "sn")
    private String sn;

    /**
     * 库存
     */
    @Column(name = "stock")
    private Integer stock;

    /**
     * 单位
     */
    @Column(name = "unit")
    private String unit;

    /**
     * 重量
     */
    @Column(name = "weight")
    private Integer weight;

    /**
     * 品牌
     */
    @Column(name = "brand")
    private Long brand;

    /**
     * null
     */
    @Column(name = "product_category")
    private Long productCategory;

    /**
     * 供应商id
     */
    @Column(name = "supplier_id")
    private Long supplierId;

    /**
     * 条形码
     */
    @Column(name = "bar_code")
    private String barCode;

    /**
     * 商品类型(0是正常商品，1，实体卡，2虚拟卡)
     */
    @Column(name = "product_type")
    private Integer productType;

    /**
     * 商品限购数量
     */
    @Column(name = "limit_quantity")
    private Integer limitQuantity;

    /**
     * 规格
     */
    @Column(name = "specification")
    private String specification;

    /**
     * null
     */
    @Column(name = "size")
    private String size;

    /**
     * 是否默认展示（商品搜索只展示默认商品）
     */
    @Column(name = "default_display")
    private Integer defaultDisplay;

    /**
     * 运费
     */
    @Column(name = "freight")
    private Double freight;

    /**
     * 商品编码（用于识别同一种商品下不同规格）
     */
    @Column(name = "product_sn")
    private String productSn;

    /**
     * 是否是扫码商品
     */
    @Column(name = "is_scanning")
    private Boolean IsScanning;

    /**
     * 配送方式 （快递包邮/送货上门）
     */
    @Column(name = "express")
    private String express;

    /**
     * 推荐
     */
    @Column(name = "recommend")
    private String recommend;

    /**
     * 备注
     */
    @Column(name = "remark")
    private String remark;

    /**
     * 部门id
     */
    @Column(name = "dept_id")
    private Long deptId;

    /**
     * null
     */
    @Column(name = "list")
    private Integer list;

    /**
     * null
     */
    @Column(name = "pv_counts")
    private String pvCounts;


}
